function [Xparts_dynamic] = make_Xdynamic_pairAdoptions(config, Xdynamic_staticInputs, installedBases, outputLabels)
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	%%%%% Inputs:
	% config:					object (from getConfig_consumerAdoptions)
	% Xdynamic_staticInputs:	object
	% 	.Xparts_static:				cell(NumParts,1)
	%		{2}:						object
	%			.X							dim1 x NumXstatic
	%			.X_FEs						dim1 x NumX_FEs
	%   	    .NumX_FE_vals               1 x NumX_FEs
	%			.Xnames						cell(1,NumXstatic) of strings
	%			.X_FE_labels				cell(1, NumX_FEs) of strings
	%		{3}:						object
	%			.X							dim1 x NumXstatic
	%			.X_FEs						dim1 x NumX_FEs
	%   	    .NumX_FE_vals               1 x NumX_FEs
	%			.Xnames						cell(1,NumXstatic) of strings
	%			.X_FE_labels				cell(1, NumX_FEs) of strings
	% installedBases:			object
	% 	.laggedConsumersOrig:			dim1 x 1
	% 	.laggedConsumersDest:			dim1 x 1
	% outputLabels:				boolean
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	%%%%% Outputs:
	% Xparts_dynamic:			cell(NumParts,1)
	%	{2}:						object
	%		.X:							dim1 x NumXdynamic
	%		.X_FEs						dim1 x NumX_FEs
	%       .NumX_FE_vals               1 x NumX_FEs
	%		.Xnames:					cell(1,NumXdynamic) of strings
	%		.X_FE_labels				cell(1, NumX_FEs) of strings
	%	{3}:						object
	%		.X:							dim1 x NumXdynamic
	%		.X_FEs						dim1 x NumX_FEs
	%       .NumX_FE_vals               1 x NumX_FEs
	%		.Xnames:					cell(1,NumXdynamic) of strings
	%		.X_FE_labels				cell(1, NumX_FEs) of strings
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	
	% Unbundle installedBases
	laggedConsumersOrig = installedBases.laggedConsumersOrig;
	laggedConsumersDest = installedBases.laggedConsumersDest;
	
	% Unbundle Xdynamic_staticInputs
	Xparts_static = Xdynamic_staticInputs.Xparts_static;
	
	% Initialize Xparts_dynamic
	Xparts_dynamic = cell(3,1);
	
	%%% T-K1 part:
	if config.laggedBaseTransf.code == 1
		newX      = log(1+laggedConsumersOrig);       				% dim1 x 1
		if outputLabels; newXnames = {'logLaggedConsumersOrig'}; end;
	end
	if config.laggedBaseTransf.code == 2
		extraArgs     = Xdynamic_staticInputs.extraArgs;
		logDenom = extraArgs{1}; % dim1 x 1
		newX = log(1+laggedConsumersOrig) - logDenom; % dim1 x 1
		if outputLabels; newXnames = {'log_LaggedConsumersOrig_density'}; end;
	end
	if config.laggedBaseTransf.code == 11
		newX      = 1e-2*laggedConsumersOrig;       				% dim1 x 1
		if outputLabels; newXnames = {'laggedConsumersOrig_x_1e-2'}; end;
	end
	
	Xparts_dynamic{2}.X            = [newX Xparts_static{2}.X]; % dim1 x NumXdynamic
	Xparts_dynamic{2}.X_FEs        = Xparts_static{2}.X_FEs;
	Xparts_dynamic{2}.NumX_FE_vals = Xparts_static{2}.NumX_FE_vals;
	if outputLabels
		Xparts_dynamic{2}.Xnames = [newXnames Xparts_static{2}.Xnames]; % 1 x NumX
		Xparts_dynamic{2}.X_FE_labels = Xparts_static{2}.X_FE_labels;
	end
	
	
	%%% T-K2 part:
	if config.laggedBaseTransf.code == 1
		newX = log(1+laggedConsumersDest);       				% dim1 x 1
		newX = max(newX, -2e4); % Any number would do for estimation because of "trick" with logLambdaOffset.
		if outputLabels; newXnames = {'logLaggedConsumersDest'}; end;
	end
	if config.laggedBaseTransf.code == 2
		logDenom = extraArgs{1}; % dim1 x 1
		newX = log(1+laggedConsumersDest)  - logDenom;       		% dim1 x 1
		newX = max(newX, -2e4); % Any number would do for estimation because of "trick" with logLambdaOffset.
		if outputLabels; newXnames = {'log_LaggedConsumersDest_density'}; end;
	end
	if config.laggedBaseTransf.code == 11
		newX      = 1e-2*laggedConsumersDest;       				% dim1 x 1
		if outputLabels; newXnames = {'laggedConsumersDest_x_1e-2'}; end;
	end

	Xparts_dynamic{3}.X = [newX Xparts_static{3}.X]; % dim1 x NumXdynamic
	Xparts_dynamic{3}.X_FEs        = Xparts_static{3}.X_FEs;
	Xparts_dynamic{3}.NumX_FE_vals = Xparts_static{3}.NumX_FE_vals;
	if outputLabels
		Xparts_dynamic{3}.Xnames = [newXnames Xparts_static{3}.Xnames]; % 1 x NumX
		Xparts_dynamic{3}.X_FE_labels = Xparts_static{3}.X_FE_labels;
	end
end
